package com.suitsoft.ut.dao.base;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import org.springside.modules.orm.hibernate.HibernateDao;

import com.suitsoft.ut.entity.base.Student;

/**
 *
 *@author Suineg
 */
@Repository
public class StudentDao extends HibernateDao<Student,Long>{
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	
	public Student findByUser(Long id){
		String hql = "from Student s where s.forUser.id = " + id;
		return findUnique(hql);
	}
	
	public List<Student> findByNothesis(){
		String hql ="from Student s where s.thesis.id is null";
		return find(hql);
	}
}

